import { LibEntity } from '@/lib/entity/libEntity';
import { IsString } from 'class-validator';
import { Entity, Column } from 'typeorm';

@Entity('t_system_sys') //生成的表名
export class SysEntity extends LibEntity {
  /**
   * 谁操作的
   */
  @IsString()
  @Column({ type: 'varchar', length: 255, nullable: false })
  who: string;

  /**
   * 通过那个路由操作
   */
  @IsString()
  @Column({ type: 'varchar', length: 255, nullable: false })
  action_controller: string;

  /**
   * 操作了什么
   */
  @IsString()
  @Column({ type: 'varchar', length: 255, nullable: false })
  action: string;
}
